// Fill out your copyright notice in the Description page of Project Settings.


#include "Input/InputConfig.h"

UInputAction* UInputConfig::FindAbilityTaggedInputActionByTag(const FGameplayTag& InputTag, const bool bLogNotFound)
{
	for (FTaggedInputAction& Action : AbilityTaggedInputActions)
	{
		if (Action.InputAction && Action.InputTag == InputTag)
		{
			return Action.InputAction;
		}
	}

	if (bLogNotFound)
	{
		UE_LOG(LogTemp, Error, TEXT("无法从InputConfig[%s]中找到InputTag[%s]找到对应的技能InputAction"), *GetNameSafe(this),
		       *InputTag.ToString());
	}

	return nullptr;
}
